import { RouterProvider } from 'react-router-dom'
import routers from './constant/router'
import { useLayoutEffect } from 'react'
import { isMobile } from './utils'

const App = () => {
  useLayoutEffect(() => {
    document.documentElement.classList.add(isMobile() ? 'mobile-app' : 'pc-app')
  }, [])

  return (
    <>
      <RouterProvider router={routers} />
    </>
  )
}

export default App
